<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- header -->
    <%@ include file="/WEB-INF/views/include/header.jsp" %>

</head>
<body class="no-skin">


<!-- /section:basics/navbar.layout -->
<table></table>
<div class="main-container" id="main-container">

    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <div class="pull-left">
                            <button class="btn btn-sm btn-info" id="queryMailList">查询筛选</button>
                            <button class="btn btn-sm btn-success" id="exportTable">导出表</button>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <table id="gridTable"></table>
                        <div id="gridPager"></div>
                        <div style="display: none;">
                            <div class="row" id="queryDialog"></div>
                        </div>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>

</div><!-- /.main-container -->
</div>
<!-- footer -->
<script src="<s:url value="/assets/web/js/jquery.min.js?v=2.1.4"></s:url>"></script>
<link rel="stylesheet" href="<s:url value="/assets/web/css/login/bootstrap.min.css?v=3.3.6"></s:url>">
<script src="<s:url value="/assets/web/js/jqpaginator.min.js"></s:url>"></script>
<script src="<s:url value="/assets/web/js/baseAPI.js"></s:url>"></script>
<script src="<s:url value="/assets/web/common/bootstrapvalidator/dist/js/bootstrapValidator.js"></s:url>"></script>
<%@ include file="/WEB-INF/views/include/footer.jsp" %>
<!-- dialog -->
<%@ include file="/WEB-INF/views/include/dialog.jsp" %>

<script type="text/javascript">
    //基本路径
    var baseUrl = "<s:url value="/reportForm1"></s:url>/"
    //jqgrid的表格高度
    var height = 320;
    //jqgrid表格行头的中文
    var colNames = ['', '单位', '角色', '姓名', '联系电话' ];
    var colModel = [
        {name: 'sysId', width: 60, hidden: true, key: true},
        {name: 'branch', index: 'taskName', width: 160, editable: true},
        {name: 'role', index: 'projectName', width: 160, editable: true},
        {name: 'name', index: 'nodeId', width: 160, editable: true},
        {name: 'phone', index: 'nodeName', width: 160, editable: true}
    ];
    //jqgrid的具体执行方法
    jqgrid({
        shrinkToFit:false,
        gridTableId : "#gridTable",
        gridPagerId : "#gridPager"
    });

    $("#exportTable").click(function () {
        exportData = $('#formDialog form').serialize();
        var url ="/export/exportNodeDetail"+exportData;
        // window.open(url);
    });

    $("#queryMailList").click(function () {
        showDialog({
            dialogTitle: '查询设置',
            dialogBody: queryDialog,
            dialogFoot: "<button type='button' class='btn btn-primary' onclick='query()'>查询</button>" +
                "<button type='button' class='btn btn-pink' onclick='reset()'>重置</button>" +
                "<button type='button' class='btn btn-default' data-dismiss='modal'>关闭</button>"
        });
    });
    //加载查询对话框
    $("#queryDialog").load(getUrl("filter"));
    //显示查询对话框
    var queryDialog = $("#queryDialog");


    //左边菜单选中处理
    $(function () {
        $(".nav>li:nth-child(8)").addClass("active");
    })

    //重置表单
    function reset() {
        resetForm("#formDialog form");
    }

    //具体查询方法
    function query() {
        exportData = $('#formDialog form').serialize();
        seachJqgird("#gridTable", "#formDialog form");
        $("#formDialog").modal('hide');
    }


</script>

</body>
</html>